@extends('admin::layouts.master')
@section('content')
    <div class="modal-header">
        <h3 id="ModalLabel">{{ $title }}</h3>
    </div>
    <div class="modal-body">
        {{ Form::model($category,
         array( 'url'     => $packageAdmin.'/admin/category/store',
                'method'  => 'post',
                'enctype' => 'multipart/form-data',
                'role'    => 'form' ,
                'class'   => 'form-horizontal'))
            }}
            <ul class="flash_error">
                @foreach($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
                <div class="form-group">
                    {{ Form::label('category_name', 'category name', array('class' => 'control-label  col-sm-2')) }}
                    <div class="col-sm-5">
                        {{ Form::text('category_name', null, array('class' => 'form-control')) }}
                    </div>
                    <ul class="flash_error">
                     @foreach($errors->get('category_name') as $error)
                     <li>{{ $error }}</li>
                     @endforeach
                    </ul>
                </div>

                <div class="form-group">
                    {{ Form::label('category_description', 'Description', array('class' => 'control-label  col-sm-2')) }}
                    <div class="col-sm-10">
                        {{ Form::textarea('category_description', null, array('class' => 'form-control')) }}
                    </div>
                    <ul class="flash_error">
                     @foreach($errors->get('category_description') as $error)
                     <li>{{ $error }}</li>
                     @endforeach
                    </ul>
                </div>

               <div class="form-group">
                  {{ Form::label('category_description', 'Status', array('class' => 'control-label col-sm-2'))}}
                  <div class="col-sm-10">
                      <label class="radio-group">
                      {{ Form::radio('status', 1 , true, array('id' => 'published')) }}
                        Published
                      </label>
                      <label class="radio-group">
                      {{ Form::radio('status', 0, false, array('id' => 'unpublished')) }}
                        Unpublished
                      </label>
                      <ul class="flash_error">
                         @foreach($errors->get('status') as $error)
                         <li>{{ $error }}</li>
                        @endforeach
                       </ul>
                   </div>
               </div>
              <div class="form-group right">
                {{ Form::label('', '', array('class' => 'control-label  col-sm-2')) }}
                    <div class="col-sm-10">
                       {{ Form::hidden('id') }}
                       {{ Form::submit($category->id ? 'Update': 'Save', array('class' => 'btn btn-primary')) }}
                       {{ Form::button('Clear', array('class' => 'btn btn-default', 'type' => 'reset')) }}
                   </div>
              </div>
        {{ Form::close() }}
        </div> <!-- end modal-body -->
        <div class="modal-footer"></div>
@stop